package cn.v2tila.rsosa.student.jpa;

import cn.v2tila.rsosa.student.entity.DeliveryEntity;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

/**
 * @author v2tila on 1:06 2019/3/29
 */

public interface DeliveryJPA extends JpaRepository<DeliveryEntity, Integer>, JpaSpecificationExecutor<DeliveryEntity> {
    boolean existsByUniqueIdAndZpxxId(String uniqueId, Integer zpxxId);
    List<DeliveryEntity> findByUniqueId(String uniqueId);
    Page<DeliveryEntity> findByAssoIdAndCode(Integer assoId, Integer code, Pageable pageable);

    boolean existsByAssoIdAndCode(Integer assoId, Integer code);
}
